package com.zhangxin.easyexcelutil.model;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhangxin.easyexcelutil.annotation.ExcelAnnotation;
import com.zhangxin.easyexcelutil.converter.ExcelConverter;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by zhangxin on 2021/1/30.
 */

public class User implements Serializable {

    @ExcelIgnore
    private int id;
    @ExcelProperty(value = "姓名",index = 0)
    private String name;
    @ExcelProperty(value = "年龄",index = 1)
    private int age;
    @ExcelAnnotation(excel = {"男","女"},java = {"0","1"})
    @ExcelProperty(value = "性别",index = 2,converter = ExcelConverter.class)
    private String gender;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ExcelProperty(value = "出生日期",index = 3)
    private Date birthday;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
}
